/**************************************************************
 *   File:	Renderer.h
 * Author:	Andrew Thorpe
 *  Brief:	A system to render ScreenQuads
 **************************************************************/
#ifndef _FOSSIL_RENDERER_H
#define _FOSSIL_RENFERER_H

#include "Singleton.h"

namespace Fossil
{
	//Forward declarations
	class ScreenQuad;

	class Renderer : public Singleton<Renderer>
	{
	public:
		Renderer(void):m_Width(0.0f), m_Height(0.0f) {}
		~Renderer(void) {}

		void Initialise();
		void Destroy();

		void Resize(int width, int height);
		void Render(ScreenQuad* pScreenQuad);
	private:

		void RenderChildren(ScreenQuad* pScreenQuad);

		struct RenderStage
		{
			float width;
			float height;
			RenderStage():width(0.0f), height(0.0f) {}
		};

		int m_pCurrentStage;
		RenderStage* m_pRenderStages;

		float m_Width, m_Height;
	};
};

#endif//_FOSSIL_RENDERER_H
